QTextCodec: avoid read-past-buffer in codecForName()
Origin: upstream, https://code.qt.io/cgit/qt/qt5compat.git/commit/?id=
894079b4932dc878
Last-Update: 2026-07-26
The old code passed a QByteArray to a function taking const char*,
invoking QByteArray::operator const char*() implicitly.
The callee expects the argument to be NUL-terminated, but if the
QByteArray was created fromRawData(), that is not guaranteed.
In newer Qt versions we have nullTerminated(), but this needs to be
picked further back, so use a std::string to do the null-termination.
Gbp-Pq: Name CVE-2026-9499.diff